package baozhuangstream;

import java.io.*;

public class Test {
    // 将day09-code/src/file/072-面试题整理.avi
    // 使用包装流复制到day09-code/src/file/1.avi
    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();
        BufferedInputStream fis = new BufferedInputStream(new FileInputStream("day09-code/src/file/072-面试题整理.avi"));
        BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream("day09-code/src/file/1.avi"));
        byte[] car = new byte[1024];
        int len;
        while ((len = fis.read(car)) != -1){
            fos.write(car,0,len);
            fos.flush();
        }
        System.out.println("复制完毕");
        long end = System.currentTimeMillis();
        System.out.println("耗时：" + (end - start) + "毫秒");
    }

    // 将D:/course/02-JavaSE进阶/day07-集合和泛型+数据结构和算法/录屏/072-面试题整理.avi
    // 使用字节流复制到D:/develop/idea/javase-code/day09-code/src/file/1.avi

}
